package cn.wolfcode.feign;

import cn.wolfcode.domain.Product;
import cn.wolfcode.fallback.ProductFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name ="product-service",fallback = ProductFeignFallBack.class)
public interface ProductFeignApi {

    @RequestMapping("/product")
    public Product findByPid(@RequestParam("pid") Long pid);

}
